|
WRITE FLOAT
This command will write a float to the file from a real value.
WRITE FLOAT File Number, Variable
File Number
Integer
The file number
Variable
Float
The float value
This command does not return a value.
The file specified by the file number must be open or the command will fail.
cls
open to write 1,"data.dat"
if file open(1)=1
write float 1,42.0
endif
close file 1
wait 1000*8
open to read 1,"data.dat"
if file open(1)=1
read float 1,a#
print "value= "+str(a#)
endif
close file 1
do
loop
end
FILE Commands Menu
Index
|